home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #2 / Monster Media No. 2 (Monster Media)(1994).ISO / prog_gen / verpat00.zip / VERPATCH.DOC < prev   
Text File  |  1994-07-16  |  5KB  |  146 lines

  1. Version Patching (C)Copyright 1993 Rob Cohan
  2.  
  3. Here are a pair of programs we use to place version numbers in executable
  4. programs after they're built.  We use them all the time and hope you will
  5. find them useful also.
  6.  
  7. The version patching programs are JokePostcardWare.  To register, send a 
  8. picture postcard with your favorite joke on it, 1000 words or less.
  9.  
  10. Send to:
  11.  
  12. Rob Cohan
  13. PO Box 416
  14. Feasterville, PA 19053-0416
  15.  
  16.  
  17. For Clarion programs, create two fields in the MEMORY file:
  18.  
  19. 1)    MEM:VersionMinor
  20.     The value is the key.  These are ASCII 179, 189, every 10 up to 249.
  21.     Create these by holding down the Alt key, typing 179 on the keypad
  22.     and releasing the Alt key, etc.
  23.     You're creating eight characters even though the string is length
  24.     four (4).
  25. ╔══════════════════════════════════════════
  26. ║                    Field
  27. ║  Field Name :VersionMinor
  28. ║  Description:Target for version patching
  29. ║  Type       :String
  30. ║  Length     :  4
  31. ║  Picture    :@s4
  32. ║  Value      :'│╜╟╤█σ∩∙'
  33.  
  34.  
  35. 2)    mem:VersionMajor
  36. ╔══════════════════════════════════════
  37. ║                    Field
  38. ║  Field Name :VersionMajor
  39. ║  Description:
  40. ║  Type       :String
  41. ║  Length     :  1
  42. ║  Picture    :@s1
  43. ║  Value      :'1'
  44.  
  45.  
  46. Whereever you wish to display the version, build it up from the two 
  47. fields, such as:
  48. ╔════════════════════════════════════════════╗
  49. ║               Computed Field               ║
  50. ║                                            ║
  51. ║  Name        :SCR:version                  ║
  52. ║  Picture     :@s6                          ║
  53. ║  Expression  :mem:versionmajor & '.' & mem:versionminor
  54. ║  Result Field:                             ║
  55. ║  Attribute   :Normal                       ║
  56. ║                                            ║
  57. ╚════════════════════════════════════════════╝
  58. Or,  you can display them separately.
  59.  
  60. Once this is done, you have to touch your .app file only when the major
  61. version number changes (the '2' in 2.0.)
  62.  
  63. Set the Initial Minor Version at the DOS command line using the following
  64. command: (assuming the initial verison in this example is 1.0232)
  65.  
  66.     ECHO 0232 > version
  67.  
  68. Note: the .EXE must be uncompressed for this operation to succeed.  
  69. If you use PKLITE.EXE, it should be used after version patching.  Certain
  70. operations automatically call it, though by its primary name only.  To bypass
  71. this problem, we have included a .COM file named PKLITE which should be copied
  72. into your local directory (where your .APP is) to provide a false target.  It
  73. merely reports the date to the screen.  You can later on explicitly run
  74. PKLITE.EXE by its full name and you will bypass the false target .COM file.
  75. An example is given below.
  76.  
  77. To insert the version number in the final executable, at the DOS command
  78. prompt you can do this, assuming XYZ.EXE is your .EXE name:
  79.  
  80.     INSVER xyz.exe
  81.  
  82. To make the number increment, just type at the DOS prompt:
  83.  
  84.     BUMPVER
  85.  
  86. We use a batch file called NEWVER.BAT in each application subdirectory
  87. constructed as follows:
  88.  
  89.     -------------- NEWVER.BAT, cut here -------------------------
  90.     bumpver
  91.     insver xyz.exe
  92.     pklite.exe -a -o xyz.exe
  93.     -------------- newver.bat, cut here -------------------------
  94.  
  95.  
  96. Sometimes our display of version number is buried in the program in an
  97. "About this program" screen.  When we do this, it is not immediately 
  98. apparent that a certain executable is not version stamped.  On the 
  99. primary menu screen we place a flashing red reminder constructed as
  100. follows:
  101. ╔════════════════════════════════════════════╗▒▒▒▒
  102. ║              Conditional Field             ║▒▒▒▒ NVS stands for 
  103. ║                                            ║▒▒▒▒ non-version-stamped
  104. ║  Name        :SCR:noversion                ║▒▒▒▒
  105. ║  Picture     :@s3                          ║▒▒▒▒ 
  106. ║  Condition   :left(mem:version,4)='│╜╟╤'   ║▒▒▒▒
  107. ║    If True   :'NVS'                        ║▒▒▒▒
  108. ║    If False  :''                           ║▒▒▒▒
  109. ║  Result Field:                             ║▒▒▒▒
  110. ║  Attribute   :Red BLK On Black             ║▒▒▒▒
  111. ╚════════════════════════════════════════════╝▒▒▒▒
  112.  
  113. We hope you enjoy and find use in these programs.  
  114.  
  115.  
  116.                       Disclaimer of Warranty
  117.  
  118. Users of this software must accept this disclaimer of warranty:
  119.  
  120. This software is supplied as is. 
  121.  
  122. Rob Cohan disclaims all warranties, either express or implied, including but 
  123. not limited to implied warranties of merchantability and fitness for a 
  124. particular purpose, with respect to the software and the accompanying 
  125. written materials.
  126.  
  127. No liability for consequential damages. In no event shall Rob Cohan be 
  128. liable for any damages whatsoever (including, without limitation, damages
  129. for loss of business profits, business interruption, loss of business 
  130. information, or other pecuniary loss) arising out of the use of or 
  131. inability to use these products, even if Rob Cohan has been advised 
  132. of the possibility of such damages. Because some states do not allow 
  133. the exclusion or limitation of liability for consequential or incidental 
  134. damages, this software may not be used or licensed in those states.
  135.  
  136.  
  137. File list:
  138.  
  139. INSVER   EXE     11990 07-10-93   8:14p
  140. BUMPVER  EXE     10156 03-11-93   8:01p
  141. PKLITE   COM       325 12-20-91   8:50p
  142. VERPATCH DOC      5163 07-16-94   6:20a
  143.  
  144.